package com.fh.shop.controller;/**
 * 描述:
 * Author:袁亚强
 * Date:2021/12/1315:46
 */

import com.fh.common.baseData.TongyiData;
import com.fh.shop.entity.vo.ShopVo;
import com.fh.shop.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * created by macro on 2021/12/13,
 */
@RestController
@RequestMapping("shop")
public class ShopController {
    @Autowired
    private ShopService shopService;

    @GetMapping("query")
    public TongyiData query() {
        return TongyiData.succeess(shopService.qeury());
    }

    @PostMapping("queryPage")
    public TongyiData queryPage(ShopVo shopVo) {
        return TongyiData.succeess(shopService.queryPage(shopVo));
    }


    @PostMapping("queryById")
    public TongyiData queryById(Integer id) {
        return TongyiData.succeess(shopService.qeuryById(id));
    }

    @PostMapping("qeuryByIdAllData")
    public TongyiData qeuryByIdAllData(Integer id) {
        return TongyiData.succeess(shopService.qeuryByIdAllData(id));
    }
}
